package com.p2p.funds.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.p2p.base.model.P2PRechargeReturn;
import com.p2p.funds.dao.P2PRechargeReturnDao;
import com.p2p.funds.service.P2PRechargeReturnService;

@Service
public class P2PRechargeReturnServiceImpl implements P2PRechargeReturnService {
	@Resource private P2PRechargeReturnDao p2pRechargeReturnDao;
	
	public void saveP2PRechargeReturn(P2PRechargeReturn p2pRechargeReturn) {
		Long rid = p2pRechargeReturn.getRid();
		P2PRechargeReturn existObj = this.getP2PRechargeReturnByRid(rid);
		if (existObj == null) {
			p2pRechargeReturnDao.saveP2PRechargeReturn(p2pRechargeReturn);
		}
	}

	public P2PRechargeReturn getP2PRechargeReturnByRid(Long rid) {
		return p2pRechargeReturnDao.getP2PRechargeReturnByRid(rid);
	}
}
